package com.wly.datapool.stage
{
	import com.wly.datapool.map.MapPool;
	import com.wly.datapool.monster.MonsterInfo;
	import com.wly.datapool.monster.MonsterInfoStatic;
	import com.wly.datapool.monster.MonsterPool;

	public class GameStagePool
	{
		static private var _instance:GameStagePool;
		private var _stageArr:Array;
		
		public function GameStagePool()
		{
			init();
			_instance = this;
		}
		
		private function init():void
		{
			var stage:GameStageInfo;
			var monster:MonsterInfo;
			var monArr:Array = [];
			_stageArr = [];
			
			
			stage = new GameStageInfo;
			stage.mapIndex = 0;
			
			monArr = new Array;
			monster = new MonsterInfo(0);
			monster.startTick   = 50;
			monster.road        = MapPool.getInstance().getMapByMapIndex(stage.mapIndex).monsterRoad;
			monster.speed       = 2;
			monster.hpMax      	= 60;
			monArr.push(monster);
			monster = new MonsterInfo(1);
			monster.startTick   = 70;
			monster.road        = MapPool.getInstance().getMapByMapIndex(stage.mapIndex).monsterRoad;
			monster.speed       = 2;
			monster.hpMax       = 60;
			monArr.push(monster);
			monster = new MonsterInfo(1);
			monster.startTick   = 90;
			monster.road        = MapPool.getInstance().getMapByMapIndex(stage.mapIndex).monsterRoad;
			monster.speed       = 2;
			monster.hpMax       = 60;
			monArr.push(monster);
			monster = new MonsterInfo(1);
			monster.startTick   = 130;
			monster.road        = MapPool.getInstance().getMapByMapIndex(stage.mapIndex).monsterRoad;
			monster.speed       = 2;
			monster.hpMax       = 60;
			monArr.push(monster);
			monster = new MonsterInfo(1);
			monster.startTick   = 190;
			monster.road        = MapPool.getInstance().getMapByMapIndex(stage.mapIndex).monsterRoad;
			monster.speed       = 2;
			monster.hpMax       = 60;
			monArr.push(monster);
			monster = new MonsterInfo(1);
			monster.startTick   = 30;
			monster.road        = MapPool.getInstance().getMapByMapIndex(stage.mapIndex).monsterRoad;
			monster.speed       = 2;
			monster.hpMax       = 60;
			monArr.push(monster);
			stage.batArr.push(monArr);
			
//			monArr = new Array;
//			monster = new MonsterInfo(0);
//			monster.startTick   = 50;
//			monster.road        = MapPool.getInstance().getMapByMapIndex(stage.mapIndex).monsterRoad;
//			monster.speed       = 2;
//			monster.hpMax      	= 60;
//			monArr.push(monster);
//			monster = new MonsterInfo(1);
//			monster.startTick   = 70;
//			monster.road        = MapPool.getInstance().getMapByMapIndex(stage.mapIndex).monsterRoad;
//			monster.speed       = 2;
//			monster.hpMax       = 60;
//			monArr.push(monster);
//			monster = new MonsterInfo(1);
//			monster.startTick   = 90;
//			monster.road        = MapPool.getInstance().getMapByMapIndex(stage.mapIndex).monsterRoad;
//			monster.speed       = 2;
//			monster.hpMax       = 60;
//			monArr.push(monster);
//			monster = new MonsterInfo(1);
//			monster.startTick   = 130;
//			monster.road        = MapPool.getInstance().getMapByMapIndex(stage.mapIndex).monsterRoad;
//			monster.speed       = 2;
//			monster.hpMax       = 60;
//			monArr.push(monster);
//			monster = new MonsterInfo(1);
//			monster.startTick   = 190;
//			monster.road        = MapPool.getInstance().getMapByMapIndex(stage.mapIndex).monsterRoad;
//			monster.speed       = 2;
//			monster.hpMax       = 60;
//			monArr.push(monster);
//			monster = new MonsterInfo(1);
//			monster.startTick   = 230;
//			monster.road        = MapPool.getInstance().getMapByMapIndex(stage.mapIndex).monsterRoad;
//			monster.speed       = 2;
//			monster.hpMax       = 60;
//			monArr.push(monster);
//			stage.batArr.push(monArr);
			
//			monArr = new Array;
//			monster = new MonsterInfo(0);
//			monster.startTick   = 50;
//			monster.road        = MapPool.getInstance().getMapByMapIndex(stage.mapIndex).monsterRoad;
//			monster.speed       = 2;
//			monster.hpMax      	= 60;
//			monArr.push(monster);
//			monster = new MonsterInfo(1);
//			monster.startTick   = 70;
//			monster.road        = MapPool.getInstance().getMapByMapIndex(stage.mapIndex).monsterRoad;
//			monster.speed       = 2;
//			monster.hpMax       = 60;
//			monArr.push(monster);
//			monster = new MonsterInfo(1);
//			monster.startTick   = 90;
//			monster.road        = MapPool.getInstance().getMapByMapIndex(stage.mapIndex).monsterRoad;
//			monster.speed       = 2;
//			monster.hpMax       = 60;
//			monArr.push(monster);
//			monster = new MonsterInfo(1);
//			monster.startTick   = 130;
//			monster.road        = MapPool.getInstance().getMapByMapIndex(stage.mapIndex).monsterRoad;
//			monster.speed       = 2;
//			monster.hpMax       = 60;
//			monArr.push(monster);
//			monster = new MonsterInfo(1);
//			monster.startTick   = 190;
//			monster.road        = MapPool.getInstance().getMapByMapIndex(stage.mapIndex).monsterRoad;
//			monster.speed       = 2;
//			monster.hpMax       = 60;
//			monArr.push(monster);
//			monster = new MonsterInfo(1);
//			monster.startTick   = 230;
//			monster.road        = MapPool.getInstance().getMapByMapIndex(stage.mapIndex).monsterRoad;
//			monster.speed       = 2;
//			monster.hpMax       = 60;
//			monArr.push(monster);
//			stage.batArr.push(monArr);
			
			_stageArr.push(stage);
		}
		
		static public function getInstance():GameStagePool
		{
			return _instance;
		}
		
		public function getGamestageByIndex(index:int):GameStageInfo		
		{
			return _stageArr[index] as GameStageInfo;
		}
	}
}